package com.cmcc.cmii.common.enums;

import lombok.Getter;
import org.springframework.http.HttpStatus;

/**
 * @author Thanks
 */

@Getter
public enum  ResultEnum {

    SUCCESS(HttpStatus.OK.value(),"操作成功!"),
    RUNTIME_ERROR(2001,"运行时出错,请检查系统!"),
    NULL_PARAM_ERROR(2002,"必要参数为空,请检查参数正确性!"),
    CLASS_CAST_ERROR(2003,"类型转换异常,请检查参数类型是否正确!"),
    IO_ERROR(2004,"系统IO异常,请检查系统运行情况!"),
    NO_SUCH_METHOD(2005,"访问了未知方法!"),
    INDEX_OUT_OF_BOUNDS(2006,"数据越界,请检查参数是否正确!"),
    STACK_OVER_FLOW(2007,"应用堆栈溢出,请检查系统!"),
    ARITHMETIC_ERROR(2008,"除零异常,请检查参数!"),

    UNKNOWN_ERROR(4000,"未知异常!"),
    ;
    private Integer code;

    private String message;

    ResultEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

}
